from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1233158886.8280001
_template_filename='D:\\pylons\\learnpylons\\SimpleSite\\simplesite\\templates/derived/page/edit.html'
_template_uri='/derived/page/edit.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['heading', 'js']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 2
    ns = runtime.Namespace('fields', context._clean_inheritance_tokens(), templateuri='fields.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, 'fields')] = ns

def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, '/base/index.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, 'fields')._populate(_import_ns, ['*'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n\n')
        # SOURCE LINE 6
        __M_writer(u' \n')
        # SOURCE LINE 38
        __M_writer(u'\n<link rel="stylesheet" type="text/css" href="/yui/2.6.0/assets/skins/sam/skin.css" />\n\n')
        # SOURCE LINE 41
        __M_writer(escape(h.form(h.url_for(controller='page', action='save'))))
        __M_writer(u'\n   \n<fieldset>\n\n<legend>Study</legend>\n\n<label for="heading">Heading:</label><br/>\n')
        # SOURCE LINE 48
        __M_writer(escape(h.text(name="heading", id="heading")))
        __M_writer(u'<br /><br/>\n\n<label for="title">Title:</label><br/>\n')
        # SOURCE LINE 51
        __M_writer(escape(h.text(name="title", id="title")))
        __M_writer(u'<br/><br/>\n\n<label for="content">content:</label><br/>\n')
        # SOURCE LINE 54
        __M_writer(escape(h.textarea(name="content", id="content")))
        __M_writer(u'<br/><br/>\n\n\n')
        # SOURCE LINE 57
        __M_writer(escape(h.submit(name="action", value="edit")))
        __M_writer(u'\n<br/><br/>\n</fieldset>\n\n')
        # SOURCE LINE 61
        __M_writer(escape(h.end_form()))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_heading(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'fields')._populate(_import_ns, ['*'])
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 4
        __M_writer(u'\n    <h1 class="main">Editing ')
        # SOURCE LINE 5
        __M_writer(escape(c.title))
        __M_writer(u'</h1>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_js(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'fields')._populate(_import_ns, ['*'])
        navfields = _import_ns.get('navfields', context.get('navfields', UNDEFINED))
        parent = _import_ns.get('parent', context.get('parent', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 7
        __M_writer(u'\n    ')
        # SOURCE LINE 8
        __M_writer(escape(parent.js()))
        __M_writer(u'\n    ')
        # SOURCE LINE 9
        __M_writer(escape(navfields.js()))
        __M_writer(u'\n\n    <script type="text/javascript" src="/yui/2.6.0/element/element-beta-min.js"></script>\n    <script type="text/javascript" src="/yui/2.6.0/container/container_core-min.js"></script>\n    <script type="text/javascript" src="/yui/2.6.0/editor/simpleeditor-min.js"></script>\n\n    <script type="text/javascript">\n    (function() {\n        //Setup some private variables\n        var Dom = YAHOO.util.Dom,\n            Event = YAHOO.util.Event;\n\n            //The SimpleEditor config\n            var myConfig = {\n                height: \'200px\',\n                width: \'630px\',\n                dompath: true,\n                focusAtStart: true,\n                handleSubmit: true\n            };\n\n        //Now let\'s load the SimpleEditor..\n        var myEditor = new YAHOO.widget.SimpleEditor(\'editor\', myConfig);\n        myEditor._defaultToolbar.buttonType = \'advanced\';\n        document.e = myEditor;\n        myEditor._defaultToolbar.titlebar = \'Rich Text Editor\';\n        myEditor.render();\n    })();\n    </script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


